package com.czapl.towers;

import com.badlogic.gdx.math.Vector2;
import com.czapl.api.IProjectile;
import com.czapl.api.IUnit;
import com.czapl.drawing.AnimatedSprite;
import com.czapl.drawing.CTower;
import com.czapl.mygdxgame.MyGdxGame;

public class IceTower extends CTower {

	public IceTower() {
		super();
		m_range = 100;
		m_fireRate = 10;
		m_animatedSprite = new AnimatedSprite(MyGdxGame.towerAtlas, "tower2", 2);
	}
	
	public IceTower(IceTower iceTower) {
		super(iceTower);
	}

	@Override
	public CTower clone() {
		return new IceTower(this);
	}

	@Override
	protected void launchProjectile(IUnit unit) {
		IProjectile projectile = new ArrowProjectile(new Vector2(getX(), getY()));
		projectile.launch(unit);
		
	}

}
